﻿from pycad.system import *
from pycad.runtime import *

@panel('e6da31c9-a27d-4750-b36c-1f045db789c1', 'testpanel2')
class showpanel(object):
    text = '测试面板'
    dockside = acws.DockSides.Right
    def __init__(self, ps):
        from pytest.forms.TPanel import TPanel
        from System.Drawing import Size
        ps.Style = \
            acws.PaletteSetStyles.NameEditable | \
            acws.PaletteSetStyles.ShowCloseButton | \
            acws.PaletteSetStyles.Notify
        ps.DockEnabled = acws.DockSides.Left | acws.DockSides.Right
        ps.MinimumSize = Size(320, 320)
        ps.Add("P1", TPanel())
    def __docking__(self, ps):
        from System.Drawing import Size
        ps.Size = Size(320, 320)
        #可以设置固定的dock方式
        #self.dock = acws.DockSides.None
    def __docked__(self, ps):
        print 'hello world'